package main

import (
	//"code.byted.org/kv/goredis"
	"code.byted.org/kv/redis-v6"
	"fmt"
	"os"
)

var (
	client *redis.Client
)

//redis 客户端的初始化
func init() {
	client = redis.NewClient(&redis.Options{
		Addr:     "localhost:6379",
		Password: "",
		DB:       0,
	})
	_, err := client.Ping().Result()
	if err != nil {
		fmt.Printf("客户端初始化出错 %v", err)
		os.Exit(2)
	}
	fmt.Println("客户端初始成功")
}
